package com.icas.controller;

import com.icas.entity.resultentity.Result;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: tocchen
 * @Date: 2022/4/21 20:02
 * @since jdk 1.8
 */
@RestController
@ResponseBody
public class ErrorController {

    /**
     * 处理被重定向后的处理
     * @param code 状态码
     * @param message 消息
     * @return 返回处理结果
     */
    @RequestMapping("/Error/{code}/{message}")
    public Result<?> tokenAuthenticationError(@PathVariable("code") Integer code,@PathVariable("message") String message){
        return Result.error(code,message);
    }

}
